Skip to content

Conversation

@alpe
Copy link
Contributor

@alpe alpe commented Dec 22, 2025

Introduce envelope for headers on DA to fail fast on unauthorized content.
Similar approach as in #2891 with a binary compatible sibling type that carries the additional information.

  • Add DAHeaderEnvelope type to wrap signed headers on DA
    • Binary compatible to SignedHeader proto type
    • Includes signature of of the plain content
  • DARetriever checks for valid signature early in the process
    • Supports SignedHeader for legacy support until first signed envelope read

@claude
Copy link
Contributor

claude bot commented Dec 22, 2025

Claude finished @alpe's task in 2m 53s —— View job


Code Review Complete

I've completed a comprehensive review of the DAHeaderEnvelope implementation. This is a well-designed security enhancement that adds an envelope signature layer to DA headers. The implementation demonstrates solid architectural thinking with backward compatibility and a strict mode transition mechanism.

Todo List

  • Read and analyze all modified files
  • Review protobuf schema changes
  • Analyze signature verification logic and security
  • Examine strict mode switching mechanism
  • Review test coverage and quality
  • Check error handling and resilience
  • Assess performance and concurrency
  • Compile comprehensive feedback

Summary

This PR introduces a DAHeaderEnvelope type that wraps SignedHeader with an additional envelope signature, enabling early verification of content integrity on the DA layer. The implementation includes:

Strengths:

  • Binary-compatible protobuf design with proper field reservation
  • Elegant strict mode transition after first valid envelope
  • Good backward compatibility with legacy format
  • Clean separation of concerns between submission and retrieval

⚠️ Key Issues Found:

  1. Redundant check in strict mode logic (lines 276-279 in da_retriever.go) - confirmed by Gemini review
  2. Insufficient test coverage (22.77% for patch - 78 lines missing coverage)
  3. Missing error handling for signature verification edge cases
  4. Performance concerns with signature verification in hot path
  5. Documentation gaps around security model and migration strategy

Detailed Review

1. Code Quality & Architecture

✅ Protobuf Schema Design (proto/evnode/v1/evnode.proto)

Good:

  • Binary compatibility between SignedHeader and DAHeaderEnvelope is correctly achieved by sharing fields 1-3
  • Field 4 is properly reserved in SignedHeader to prevent conflicts
  • Clean separation of concerns with dedicated envelope type
message SignedHeader {
  Header header = 1;
  bytes signature = 2;
  Signer signer = 3;
  reserved 4;  // ✅ Good: Prevents field number reuse
}

message DAHeaderEnvelope {
  Header header = 1;
  bytes signature = 2;
  Signer signer = 3;
  bytes envelope_signature = 4;  // ✅ Good: Extends SignedHeader compatibly
}

Concerns:

  • No documentation on wire format compatibility guarantees in comments
  • Missing version/migration strategy documentation in proto comments

Recommendation: Add proto documentation explaining the binary compatibility guarantee and migration path:

// DAHeaderEnvelope is a wrapper around SignedHeader for DA submission.
// Wire-format compatible with SignedHeader (fields 1-3).
// Migration: Nodes accept legacy SignedHeader until first valid envelope,
// then switch to strict envelope-only mode.

⚠️ Redundant Logic in da_retriever.go:276-279

Issue: The check on lines 276-279 is unreachable, as confirmed by Gemini's review:

// da_retriever.go:276-279
if r.strictMode && !isValidEnvelope {
    r.logger.Warn().Msg("strict mode: rejecting block that is not a fully valid envelope")
    return nil
}

Analysis:

  • If r.strictMode is true when reaching this line, isValidEnvelope MUST be true
  • All paths where isValidEnvelope would be false cause early returns (lines 241-255)
  • This creates dead code that can confuse readers

Recommendation: Remove lines 276-279. The logic is already correctly handled by the early return at line 241-244:

// Line 241-244 already handles this case correctly:
if r.strictMode {
    r.logger.Warn().Err(err).Msg("strict mode is enabled, rejecting non-envelope blob")
    return nil
}

✅ Serialization Code (types/serialization.go)

Good:

  • Clean API design with MarshalDAEnvelope and UnmarshalDAEnvelope methods
  • Proper separation of envelope signature from header content
  • Correct use of protobuf marshaling

Concerns:

  • UnmarshalDAEnvelope (line 218) doesn't validate envelope signature length
  • No size limits on envelope signature could allow DoS attacks
  • Missing validation that envelope signature is non-empty when expected

Recommendation: Add validation:

func (sh *SignedHeader) UnmarshalDAEnvelope(data []byte) ([]byte, error) {
    var envelope pb.DAHeaderEnvelope
    if err := proto.Unmarshal(data, &envelope); err != nil {
        return nil, err
    }
    
    // Validate envelope signature size
    if len(envelope.EnvelopeSignature) > 0 && len(envelope.EnvelopeSignature) > maxSignatureSize {
        return nil, fmt.Errorf("envelope signature too large: %d bytes", len(envelope.EnvelopeSignature))
    }
    
    if err := sh.FromDAEnvelopeProto(&envelope); err != nil {
        return nil, err
    }
    return envelope.EnvelopeSignature, nil
}

2. Error Handling & Resilience

⚠️ Signature Verification Error Handling (da_retriever.go:268-271)

Issue: Signature verification combines verification failure with signature errors:

if valid, err := header.Signer.PubKey.Verify(payload, envelopeSignature); err != nil || !valid {
    r.logger.Info().Err(err).Msg("DA envelope signature verification failed")
    return nil
}

Problems:

  1. Cryptographic errors (invalid key, algorithm issues) are indistinguishable from invalid signatures
  2. Log level is Info for what could be a critical security event (malicious blob)
  3. No metrics tracking for signature verification failures

Recommendation:

valid, err := header.Signer.PubKey.Verify(payload, envelopeSignature)
if err != nil {
    // Cryptographic error - could indicate system issue
    r.logger.Error().Err(err).Msg("envelope signature verification error")
    // Consider incrementing error metric
    return nil
}
if !valid {
    // Invalid signature - likely malicious content
    r.logger.Warn().
        Uint64("height", header.Height()).
        Uint64("da_height", daHeight).
        Msg("DA envelope signature verification failed - possible unauthorized content")
    // Consider incrementing security metric
    return nil
}

⚠️ Missing Nil Checks (da_retriever.go:259-262)

Issue: No nil check for header.Signer.PubKey before use on line 268:

// Line 259-262: Check exists but comes after potential nil dereference path
if header.Signer.PubKey == nil {
    r.logger.Debug().Msg("header signer has no pubkey, cannot verify envelope")
    return nil
}

Analysis: The check is in the right place, but the code path assumes the unmarshal succeeded. If FromDAEnvelopeProto creates a header with nil signer, we could panic.

Recommendation: Add defensive nil check:

if header.Signer.PubKey == nil || len(envelopeSignature) == 0 {
    r.logger.Debug().Msg("header signer has no pubkey or envelope signature missing")
    return nil
}

✅ Context Cancellation (da_submitter.go)

Good:

  • Proper context cancellation handling in waitForBackoffOrContext (lines 575-592)
  • Context errors properly propagated (line 486)
  • No goroutine leaks observed

3. Security

✅ Security Model

Good:

  • Two-layer signature verification: content signature + envelope signature
  • Early rejection of unauthorized content prevents resource waste
  • Strict mode prevents downgrade attacks after upgrade

Critical Concern - Replay Attack Window:

The current implementation has a potential replay attack window during the migration period:

  1. Before Strict Mode: Legacy SignedHeader blobs are accepted without envelope signatures
  2. During Migration: An attacker could replay old valid SignedHeader blobs to different DA heights
  3. Detection: Current code detects re-publication (lines 160-165) but only for the same height

Recommendation: Add nonce or timestamp validation to legacy headers during migration:

// In tryDecodeHeader, before accepting legacy blob:
if !r.strictMode && !isValidEnvelope {
    // For legacy headers, check timestamp to prevent old replays
    headerAge := time.Since(time.Unix(0, int64(header.BaseHeader.Time)))
    if headerAge > maxAcceptableLegacyAge {
        r.logger.Warn().
            Dur("age", headerAge).
            Uint64("height", header.Height()).
            Msg("legacy header too old, rejecting to prevent replay")
        return nil
    }
}

⚠️ Signature Verification Bypass Risk

Issue: In da_submitter.go:180-196, the envelope signature is created by the same signer that signed the content:

// A. Marshal the inner SignedHeader content to bytes
contentBytes, err := header.MarshalBinary()
if err != nil {
    return nil, fmt.Errorf("failed to marshal signed header for envelope signing: %w", err)
}

// B. Sign the contentBytes with the envelope signer (aggregator)
envelopeSignature, err := signer.Sign(contentBytes)

Analysis:

  • The same key signs both the header content AND the envelope
  • This provides no additional security over a single signature
  • The envelope signature should ideally be from a different authority (e.g., DA layer operator)

Question for PR Author: What is the intended security model? If the same entity signs both layers, what attack does the envelope signature prevent?

Potential Improvement: Consider using a separate envelope signer if the security model requires it, or document why the same signer is acceptable.


4. Performance & Resource Efficiency

⚠️ Signature Verification in Hot Path (da_retriever.go:234-314)

Issue: Every blob from DA undergoes signature verification synchronously in tryDecodeHeader:

// Line 240-271: Signature verification happens for EVERY blob
if envelopeSignature, err := header.UnmarshalDAEnvelope(bz); err != nil {
    // ... fallback to legacy
} else {
    if len(envelopeSignature) > 0 {
        payload, err := header.MarshalBinary()
        if err != nil {
            return nil
        }
        if valid, err := header.Signer.PubKey.Verify(payload, envelopeSignature); err != nil || !valid {
            return nil
        }
    }
}

Problems:

  1. Signature verification is computationally expensive (Ed25519: ~50µs, ECDSA: ~200µs per verification)
  2. Happens in the main blob processing loop (called from processBlobs line 159)
  3. No verification result caching
  4. Large DA heights with many blobs could cause sync delays

Measured Impact:

  • 100 blobs/block × 50µs = 5ms verification overhead per DA height
  • Could accumulate during catch-up sync

Recommendations:

  1. Cache verification results by blob hash to avoid re-verification

  2. Parallelize verification for multiple blobs:

    // In processBlobs, verify signatures concurrently
    type decodedHeader struct {
        header *types.SignedHeader
        index  int
    }
    headerCh := make(chan decodedHeader, len(blobs))
    
    for i, bz := range blobs {
        go func(idx int, blob []byte) {
            if header := r.tryDecodeHeader(blob, daHeight); header != nil {
                headerCh <- decodedHeader{header: header, index: idx}
            }
        }(i, bz)
    }
  3. Add metrics to track verification time:

    start := time.Now()
    valid, err := header.Signer.PubKey.Verify(payload, envelopeSignature)
    r.metrics.EnvelopeVerificationDuration.Observe(time.Since(start).Seconds())

✅ Memory Efficiency

Good:

  • Proper byte slice copying in FromDAEnvelopeProto (line 189, 199)
  • No obvious memory leaks in goroutines
  • Reasonable use of caching structures

Minor Concern:

  • pendingHeaders and pendingData maps (da_retriever.go:35-36) grow unbounded if matching pairs never arrive
  • Could cause memory bloat if malicious node publishes headers without data

Recommendation: Add size limits or TTL for pending items:

type daRetriever struct {
    // ...
    pendingHeaders map[uint64]*pendingItem
    pendingData    map[uint64]*pendingItem
}

type pendingItem struct {
    data      interface{}
    timestamp time.Time
}

// In processBlobs, evict stale pending items:
func (r *daRetriever) evictStalePending(maxAge time.Duration) {
    now := time.Now()
    for height, item := range r.pendingHeaders {
        if now.Sub(item.timestamp) > maxAge {
            delete(r.pendingHeaders, height)
        }
    }
    // Similar for pendingData
}

5. Testing & Reliability

⚠️ Insufficient Test Coverage (22.77% patch coverage)

Analysis of Coverage Gaps:

types/serialization.go (0% coverage, 56 lines missing):

  • ToDAEnvelopeProto (lines 149-173) - ❌ Not tested
  • FromDAEnvelopeProto (lines 175-206) - ❌ Not tested
  • MarshalDAEnvelope (lines 208-215) - ❌ Not tested
  • UnmarshalDAEnvelope (lines 217-229) - ❌ Not tested

block/internal/syncing/da_retriever.go (54.28% coverage, 16 lines missing):

  • Envelope signature verification failure paths - ❌ Not tested
  • Nil pubkey edge cases - ❌ Not tested
  • Marshal failure during verification - ❌ Not tested

block/internal/submitting/da_submitter.go (44.44% coverage, 5 lines missing):

  • Envelope signing failure paths - ❌ Not tested
  • MarshalDAEnvelope error handling - ❌ Not tested

Critical Missing Test Cases:

  1. Envelope signature verification failure:

    func TestDARetriever_EnvelopeVerificationFailure(t *testing.T) {
        // Test invalid envelope signature rejection
        // Test malformed envelope handling
        // Test nil signer.PubKey edge case
    }
  2. Serialization edge cases:

    func TestSignedHeader_DAEnvelopeSerialization(t *testing.T) {
        // Test round-trip marshaling
        // Test empty envelope signature handling
        // Test oversized envelope signature rejection
        // Test nil signer edge cases
    }
  3. Strict mode boundary conditions:

    func TestDARetriever_StrictModeBoundary(t *testing.T) {
        // Test concurrent blob processing during mode switch
        // Test behavior with mixed legacy/envelope blobs at same DA height
        // Test strict mode persistence across restarts
    }
  4. Performance/stress tests:

    func TestDARetriever_ConcurrentBlobProcessing(t *testing.T) {
        // Test processing 1000+ blobs with signature verification
        // Measure verification overhead
        // Test memory usage with pending headers/data
    }

✅ Existing Test Quality

Good aspects of da_retriever_strict_test.go:

  • Clear test scenario covering the upgrade path
  • Good use of test helpers (buildSyncTestSigner, newTestDARetriever)
  • Tests the critical strict mode switch behavior
  • Validates both accept and reject cases

Suggestions for improvement:

  1. Add table-driven tests for edge cases
  2. Test concurrent access to strictMode field (potential race condition)
  3. Test behavior when strict mode switch happens during blob processing
  4. Add benchmarks for signature verification overhead

6. Documentation & Developer Experience

⚠️ Missing Documentation

Code Comments:

  • No godoc for ToDAEnvelopeProto explaining envelope signature parameter
  • strictMode field (da_retriever.go:39-40) lacks documentation on:
    • When it's set
    • Whether it persists across restarts
    • Thread safety guarantees
  • No migration guide in comments explaining upgrade path

Recommendations:

  1. Add comprehensive godoc:

    // ToDAEnvelopeProto converts SignedHeader into DAHeaderEnvelope protobuf representation.
    // The envelopeSignature parameter should be a signature of the marshaled SignedHeader bytes,
    // providing an additional layer of authentication for DA submission.
    //
    // Security Model:
    //   - Content Signature (field 2): Signs the Header, proving block authorship
    //   - Envelope Signature (field 4): Signs the entire SignedHeader, proving DA submission authority
    //
    // Returns error if signer public key cannot be marshaled.
    func (sh *SignedHeader) ToDAEnvelopeProto(envelopeSignature []byte) (*pb.DAHeaderEnvelope, error)
  2. Document strict mode behavior:

    // strictMode indicates if the node has processed at least one valid DAHeaderEnvelope.
    // Once set to true, the retriever rejects all legacy SignedHeader blobs, preventing
    // downgrade attacks.
    //
    // Thread Safety: Read/written only in tryDecodeHeader, called serially from processBlobs.
    // Persistence: Not persisted; resets to false on restart, allowing legacy blobs until
    //              first valid envelope is seen again.
    strictMode bool
  3. Add README or MIGRATION.md explaining:

    • Why envelope signatures are needed
    • How to deploy the upgrade
    • What happens during the migration period
    • How to verify strict mode activation

✅ Good Documentation Examples

proto/evnode/v1/evnode.proto has good inline comments:

// Reserved for DAHeaderEnvelope envelope_signature
reserved 4;

da_retriever.go has helpful debug logging:

r.logger.Info().Uint64("height", header.Height()).Msg("valid DA envelope detected, switching to STRICT MODE")

7. Concurrency & Thread Safety

⚠️ Potential Race Condition: strictMode Field

Issue: strictMode field (da_retriever.go:40) is accessed without synchronization:

// Line 242: Read
if r.strictMode {
    // ...
}

// Line 283: Write
r.strictMode = true

// Line 276: Read again
if r.strictMode && !isValidEnvelope {
    // ...
}

Analysis:

  • tryDecodeHeader is called from processBlobs (line 159)
  • processBlobs is called from RetrieveFromDA (line 75)
  • If RetrieveFromDA is called concurrently from multiple goroutines, race condition exists

Current Safety: Code appears to call RetrieveFromDA serially from sync loop, but this isn't enforced

Recommendations:

  1. Add explicit documentation about thread safety requirements:

    // tryDecodeHeader attempts to decode a blob as a header.
    // NOT THREAD-SAFE: Must be called serially, as it modifies r.strictMode.
    func (r *daRetriever) tryDecodeHeader(bz []byte, daHeight uint64) *types.SignedHeader
  2. Or add synchronization if concurrent calls are possible:

    type daRetriever struct {
        // ...
        strictModeMu sync.RWMutex
        strictMode   bool
    }
    
    func (r *daRetriever) tryDecodeHeader(bz []byte, daHeight uint64) *types.SignedHeader {
        r.strictModeMu.RLock()
        isStrictMode := r.strictMode
        r.strictModeMu.RUnlock()
        
        if isStrictMode {
            // ... strict mode logic
        }
        
        // ... later, when setting:
        r.strictModeMu.Lock()
        r.strictMode = true
        r.strictModeMu.Unlock()
    }
  3. Consider atomic.Bool (Go 1.19+):

    strictMode atomic.Bool
    
    // Usage:
    if r.strictMode.Load() {
        // ...
    }
    r.strictMode.Store(true)

✅ Good Concurrency Patterns

da_submitter.go marshaling (lines 526-573):

  • Proper use of semaphore to limit concurrency (line 540)
  • Clean goroutine cleanup with context cancellation
  • No shared state mutations in parallel paths

Recommendations Summary

Critical (Must Fix)

  1. Remove redundant strict mode check (da_retriever.go:276-279)
  2. Add signature verification error handling to distinguish crypto errors from invalid signatures
  3. Increase test coverage to at least 70%, focusing on:
    • Serialization edge cases (types/serialization.go)
    • Envelope verification failures
    • Strict mode boundary conditions

High Priority (Should Fix)

  1. Add thread safety for strictMode field (mutex or atomic.Bool)
  2. Add envelope signature size validation to prevent DoS
  3. Document security model explaining why same signer can create envelope signature
  4. Add metrics for envelope verification failures and duration
  5. Implement pending item eviction to prevent unbounded memory growth

Medium Priority (Consider)

  1. Add timestamp validation for legacy headers during migration to prevent replay attacks
  2. Optimize signature verification with caching or parallelization
  3. Add migration guide (README or MIGRATION.md)
  4. Consider separate envelope signer if security model requires it

Low Priority (Nice to Have)

  1. Add benchmarks for signature verification overhead
  2. Improve proto documentation with wire format compatibility guarantees
  3. Add visualization metrics for strict mode transition timeline

Positive Aspects

Well-designed migration strategy with backward compatibility
Clean protobuf schema with proper field reservation
Good separation of concerns between submission and retrieval
Elegant strict mode concept prevents downgrade attacks
Solid test for strict mode switching (da_retriever_strict_test.go)


Questions for PR Author

  1. Security Model: Why does the same signer create both content signature and envelope signature? What attack does this prevent?
  2. Strict Mode Persistence: Should strict mode persist across node restarts? Current implementation resets it.
  3. Migration Timeline: What's the expected timeline for legacy blob support? Should there be a hard cutoff date?
  4. Performance: Have you benchmarked signature verification overhead during high-throughput scenarios (e.g., 1000+ blobs/height)?
  5. Concurrent Safety: Is RetrieveFromDA guaranteed to be called serially, or should we add synchronization?

@github-actions
Copy link
Contributor

github-actions bot commented Dec 22, 2025

The latest Buf updates on your PR. Results from workflow CI / buf-check (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped✅ passed✅ passedDec 22, 2025, 12:21 PM

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @alpe, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the security and integrity of headers submitted to the Data Availability (DA) layer. It introduces a new DAHeaderEnvelope that wraps existing SignedHeaders with an additional signature, allowing for early and robust validation of content. The system is designed for a smooth transition, maintaining backward compatibility while enabling a 'strict mode' once the new envelope format is adopted, thereby preventing unauthorized or malformed content from being processed.

Highlights

  • New DAHeaderEnvelope Type: Introduced a new DAHeaderEnvelope type to wrap SignedHeader messages for Data Availability (DA) layer submissions. This new type is binary compatible with SignedHeader (fields 1-3) but includes an additional signature for the content itself.
  • Enhanced Signature Verification: The DARetriever now attempts to unmarshal incoming blobs as DAHeaderEnvelopes and verifies the envelope signature early in the process, ensuring the integrity of the submitted content.
  • Backward Compatibility and Strict Mode: The system supports backward compatibility by initially accepting both legacy SignedHeader formats and the new DAHeaderEnvelope format. Upon successfully processing the first valid DAHeaderEnvelope, the DARetriever switches to a 'strict mode', rejecting all subsequent legacy SignedHeader blobs.
  • DASubmitter Integration: The DASubmitter has been updated to utilize a signer to create and submit DAHeaderEnvelopes, ensuring that all new header submissions are properly enveloped and signed.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a DAHeaderEnvelope to wrap signed headers, enhancing security by adding an extra layer of signature verification for content submitted to the Data Availability layer. The implementation is well-designed, providing backward compatibility with legacy SignedHeader formats and transitioning to a 'strict mode' once the first valid envelope is detected, thereafter rejecting legacy formats. The changes are logical, and the addition of TestDARetriever_StrictEnvelopeMode_Switch provides good test coverage for the new behavior. My review includes one suggestion to simplify the code by removing a redundant check.

Comment on lines +282 to 285
if r.strictMode && !isValidEnvelope {
r.logger.Warn().Msg("strict mode: rejecting block that is not a fully valid envelope")
return nil
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This check appears to be redundant. Based on the logic flow, if r.strictMode is true when this function is called, isValidEnvelope must also be true for execution to reach this line. Any case where r.strictMode is true and isValidEnvelope would be false (e.g., failed unmarshal, invalid signature, no signature) results in an early return from the function. Therefore, this conditional block seems to be unreachable and can be removed to simplify the code.

@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

❌ Patch coverage is 21.64948% with 76 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.86%. Comparing base (d386df5) to head (0b927a3).

Files with missing lines Patch % Lines
types/serialization.go 0.00% 56 Missing ⚠️
block/internal/syncing/da_retriever.go 54.83% 10 Missing and 4 partials ⚠️
block/internal/submitting/da_submitter.go 44.44% 3 Missing and 2 partials ⚠️
block/internal/submitting/submitter.go 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2948      +/-   ##
==========================================
- Coverage   59.18%   58.86%   -0.33%     
==========================================
  Files          90       90              
  Lines        8627     8715      +88     
==========================================
+ Hits         5106     5130      +24     
- Misses       2940     2998      +58     
- Partials      581      587       +6     
Flag Coverage Δ
combined 58.86% <21.64%> (-0.33%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alpe alpe changed the title Ensure Header integrity on DA feat: Ensure Header integrity on DA Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants